﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TempalteMetod
{
    public abstract class ModelBase
    {
        public string Name { get; set; }
        /// <summary>
        /// 到家吃饭
        /// </summary>
        protected abstract void Eat();
        /// <summary>
        /// 饭后娱乐活动
        /// </summary>
        protected abstract void AfterEat();
        /// <summary>
        /// 上床休息
        /// </summary>
        protected abstract void GotoBed();
        /// <summary>
        /// 稳定的主流程
        /// </summary>
        public void LetGo()
        {
            Eat();
            AfterEat();
            GotoBed();
        }
    }
}
